using System;
using AgileBoard.Core;
using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Alterations;

namespace AgileBoard.Infrastructure.NHibernateMaps
{
    public class IterationMapping : IAutoMappingOverride<Iteration>
    {
        public void Override(AutoMapping<Iteration> mapping)
        {
            mapping.References(x => x.Project);
            mapping.HasMany(x => x.States).Inverse().Cascade.All();
        }
    }
}